<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.Calendar"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>   
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>     
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>物业服务处收费月汇总表</title>
<LINK href="images/css.css" type="text/css" rel="stylesheet">
</head>

<body>
<html:form action="distQuery.do?method=doQueryDistMonthlyCharge" method="post" onsubmit="true">
<table align="center" width="60%" border="0">
	<tr>
		<td class="STYLE4" align="center" bgcolor="#ffffff" colspan="2"
			height="40">服务处收费月汇总查询
		</td>
	</tr>
	<tr><td><table align="center" class="tableline" cellspacing="1" cellpadding="0" width="100%" border="0">
	<c:if test="${user.nickname eq '管理员'}">
	    <tr>
			<td width="30%" height="26" align="right" bgcolor="#ffffff">
			物业服务处：</td>
			<td width="70%" bgcolor="#ffffff">
				&nbsp;<html:select property="distId" onchange="changeDropOfSub()" style="width:120px">
						<html:option value="0">请选择</html:option>
							<c:if test="${!empty distList}">
								<c:forEach items="${distList}" var="dist">
									<html:option value="${dist.id}">${dist.name}</html:option>
								</c:forEach>
							</c:if>
						</html:select><span id="noticeSpan" style="color:#5f9c12;">&nbsp;&nbsp;如果不选择物业服务处，则查询所有物业服务处当月收费汇总！</span>
			</td>
		</tr>
	</c:if>
	<c:if test="${user.nickname ne '管理员'}">   
	    <tr>
			<td width="30%" height="26" align="right" bgcolor="#ffffff">
			物业服务处：</td>
			<td width="70%" bgcolor="#ffffff">
				&nbsp;<html:select property="distId" onchange="changeDropOfSub()" style="width:120px">
							<c:if test="${!empty distList}">
								<c:forEach items="${distList}" var="dist">
									<c:if test="${user.district.id == dist.id}">							
										<html:option value="${dist.id}">${dist.name}</html:option>
									</c:if>	
								</c:forEach>
							</c:if>
						</html:select><span id="noticeSpan" style="color:#5f9c12;">&nbsp;&nbsp;如果不选择物业服务处，则查询所有物业服务处当月收费汇总！</span>
			</td>
		</tr>
	</c:if>	
	
	<tr>
	  <td width = "30%" height = "26" align = "right" bgcolor = "#ffffff">收费年月：</td>
	  <td width = "70%" bgcolor = "#ffffff">
	  	<%   
	  		int thisYear=Calendar.getInstance().get(Calendar.YEAR);
	  		int thisMonth=Calendar.getInstance().get(Calendar.MONTH)+1;
	  	%>
	    &nbsp;<html:select property="year" style="width:60px;">
	    	<%for(int i=thisYear;i>thisYear-10;i--){ %>
	    		<html:option value="<%=String.valueOf(i) %>"><%=i%></html:option>
	    	<%} %>
	   	</html:select>
		<select name="month" style="width:55px;">
			<%for(int j=1;j<=12;j++){ %>
	    		<option value="<%=String.valueOf(j) %>" <%if(j==thisMonth){out.print("selected='selected'");} %>><%=j%></option>
	    	<%} %>
	   	</select>
	   	&nbsp;&nbsp;<html:submit value="查询详情"/>   	
	  </td>
	</tr>
	</table>
  </td></tr>
</table>
</html:form>
</body>
</html>